GBML manual / Backgrounds

perspective_floor_screen_x

The screen x, counted from the screen’s top-left pixel, that the last perspective_floor_project call found for its point.

Game Boy: not available

Game Boy Color: not available

Sega Genesis: not built yet - The Sega Genesis will draw the road its own way.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

perspective_floor_screen_x() -> real

Returns

real

Description

The screen x, counted from the screen's top-left pixel, that the last perspective_floor_project call found for its point. It is 0 before any call, and after a call that said false.

Example

if (perspective_floor_project(300, 640)) {
    x = perspective_floor_screen_x();
}

The instance moves to the screen column the point is in.

On the GBA

0 before any call, and after a call that said false.

See also: Perspective floorperspective_floor_projectperspective_floor_screen_yperspective_floor_scale